import { Navigate } from 'react-router-dom'
import Restaurant from '../pages/restaurant'
import BusinessDetail from '../pages/detail/businessDetail';
// import { Children } from 'react';
import TabProducts from '../components/tab_products/TabProducts'
import Comments from '../components/comments/comments'
import Business from '../components/business/business'

const routerConfig = [{
    path: '/restaurant',
    Component: Restaurant,
    children: [{
        path: 'products',
        Component: TabProducts
    }, {
        path: 'comments',
        Component: Comments
    }, {
        path: 'business',
        Component: Business
    }, {
        index: true,
        element: <Navigate to='products' />
    }]
}, {
    path: '/productDetail',
    Component: BusinessDetail
}, {
    index: true,
    element: <Navigate to='/restaurant' />
}]

export default routerConfig;